home *** CD-ROM | disk | FTP | other *** search
/ Agent Central Host Computer / Agent - Central Host Computer.iso / _SETUP.1 / faretimes.sql < prev    next >
Text File  |  2000-05-12  |  1KB  |  26 lines

  1. /* RCSVER $Id: faretimes.sql,v 1.3 1999-02-24 11:56:27-06 randy CURRENT $ */
  2. /* *************************************************************************
  3. *        Copyright (C) 1998, Agent Systems, Inc. All Rights Reserved.
  4. *
  5. * Name:        faretimes.sql
  6. * Date:        12/28/1998
  7. * memo:        Randy Wood
  8. * Description:    Create the faretimes table. This table assigns a fareset to
  9. *        certain times/days of the week.
  10. * Changes:
  11. ************************************************************************* */
  12. CREATE TABLE faretimes
  13. (
  14.     beg_time    VARCHAR2(5),    /* Beginning time for this fareset */
  15.     end_time    VARCHAR2(5),    /* Ending time for this fareset */
  16.     day        NUMBER(1),    /* Day of week (0-6) */
  17.     fareset_id    NUMBER(38),    /* ID of fareset */
  18.     config_num    NUMBER(38)
  19.             CONSTRAINT ref_faretimes2 REFERENCES configset(num)
  20.             ON DELETE CASCADE,
  21.     CONSTRAINT fk_faretimes FOREIGN KEY (fareset_id, config_num)
  22.         REFERENCES faresets(id, config_num) ON DELETE CASCADE,
  23.     CONSTRAINT pk_faretimes PRIMARY KEY 
  24.              (beg_time, end_time, day, config_num)
  25. );
  26.